package com.crazy.base.common.utils.configuration;

import com.crazy.base.common.utils.servicelocate.ServiceLocator;
import com.crazy.base.common.utils.servicelocate.SpringServiceRegistry;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;

@AutoConfiguration
public class ServiceLocatorAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean(ServiceLocator.class)
    public SpringServiceRegistry serviceLocator() {
        return new SpringServiceRegistry();
    }
}
